from fastapi import APIRouter, Depends, HTTPException, Body
from sqlalchemy.orm import Session

from app.sql_app.database import get_db

router = APIRouter(tags=['Message'], prefix='/message')


@router.post("", summary="解析短信内容，并储存为订单", response_model=dict)
def crate(
        db: Session = Depends(get_db),
        content: str = Body(..., description="短信内容")
):
    # 解析短信
    try:
        pass
    except Exception as e:
        return HTTPException(status_code=500, detail=str(e))
    return {"success": True}
